package top.xiaoqiannb.shapelessdao.procedures;

import top.xiaoqiannb.shapelessdao.init.ShapelessdaoModMobEffects;

import net.minecraft.world.entity.player.Player;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.effect.MobEffectInstance;

public class Qian6Procedure {
	public static void execute(Entity entity) {
		if (entity == null)
			return;
		if (entity instanceof Player _player)
			_player.closeContainer();
		if (entity instanceof LivingEntity _entity && !_entity.level().isClientSide())
			_entity.addEffect(new MobEffectInstance(ShapelessdaoModMobEffects.TAKONG.get(), 300, 1, false, true));
		if (entity instanceof LivingEntity _entity && !_entity.level().isClientSide())
			_entity.addEffect(new MobEffectInstance(ShapelessdaoModMobEffects.COOLDOWN.get(), 60, 1, false, false));
	}
}
